package com.wishu.finance.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import lombok.Data;

/**
 * @TableName t_m_company_account_detail
 */
@TableName(value = "t_m_company_account_detail")
@Data
public class TMCompanyAccountDetail implements Serializable {
    /**
     * 主键id
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 商户id
     */
    private Long businessId;

    /**
     * 银行账户类型（1：支付账户 2：理财账户 3：贷款账户 4：营销账户）
     */
    private Integer accountType;

    /**
     * 开户银行ID
     */
    private Long bankId;

    /**
     * 开户银行名称
     */
    private String brankName;

    /**
     * 开户支行ID(修改为输入项，不是选的，故为空)
     */
    private Long bankBranchId;

    /**
     * 开户支行名称（手输，对公必须）
     */
    private String brankNameChildren;

    /**
     * 联行行号（手输，对公必须）
     */
    private String bankBranchCodeLh;

    /**
     * 账户名（对公为企业名称，对私为姓名）
     */
    private String accountName;

    /**
     * 银行卡号
     */
    private String brankId;

    /**
     * 账户状态（1：正常 2：冻结 3：暂封）
     */
    private Integer accountState;

    /**
     * 默认银行卡（0：否，1：是，默认值是0）
     */
    private Integer defaultCard;

    /**
     * 开户行所在省ID
     */
    private Integer bankAccountProvince;

    /**
     * 备注
     */
    private String remarks;

    /**
     * 预留字段1
     */
    private BigDecimal reserve1;

    /**
     * 预留字段2
     */
    private Integer reserve2;

    /**
     * 预留字段3
     */
    private String reserve3;

    /**
     * 预留字段4
     */
    private String reserve4;

    /**
     * 预留字段5
     */
    private String reserve5;

    /**
     * 删除标识（0：未删除）（1：删除）
     */
    private Integer delFlg;

    /**
     * 创建用户id
     */
    private Long createUserid;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新用户id
     */
    private Long updateUserid;

    /**
     * 更新时间
     */
    private Date updateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TMCompanyAccountDetail other = (TMCompanyAccountDetail) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
                && (this.getBusinessId() == null ? other.getBusinessId() == null : this.getBusinessId().equals(other.getBusinessId()))
                && (this.getAccountType() == null ? other.getAccountType() == null : this.getAccountType().equals(other.getAccountType()))
                && (this.getBankId() == null ? other.getBankId() == null : this.getBankId().equals(other.getBankId()))
                && (this.getBrankName() == null ? other.getBrankName() == null : this.getBrankName().equals(other.getBrankName()))
                && (this.getBankBranchId() == null ? other.getBankBranchId() == null : this.getBankBranchId().equals(other.getBankBranchId()))
                && (this.getBrankNameChildren() == null ? other.getBrankNameChildren() == null : this.getBrankNameChildren().equals(other.getBrankNameChildren()))
                && (this.getBankBranchCodeLh() == null ? other.getBankBranchCodeLh() == null : this.getBankBranchCodeLh().equals(other.getBankBranchCodeLh()))
                && (this.getAccountName() == null ? other.getAccountName() == null : this.getAccountName().equals(other.getAccountName()))
                && (this.getBrankId() == null ? other.getBrankId() == null : this.getBrankId().equals(other.getBrankId()))
                && (this.getAccountState() == null ? other.getAccountState() == null : this.getAccountState().equals(other.getAccountState()))
                && (this.getDefaultCard() == null ? other.getDefaultCard() == null : this.getDefaultCard().equals(other.getDefaultCard()))
                && (this.getBankAccountProvince() == null ? other.getBankAccountProvince() == null : this.getBankAccountProvince().equals(other.getBankAccountProvince()))
                && (this.getRemarks() == null ? other.getRemarks() == null : this.getRemarks().equals(other.getRemarks()))
                && (this.getReserve1() == null ? other.getReserve1() == null : this.getReserve1().equals(other.getReserve1()))
                && (this.getReserve2() == null ? other.getReserve2() == null : this.getReserve2().equals(other.getReserve2()))
                && (this.getReserve3() == null ? other.getReserve3() == null : this.getReserve3().equals(other.getReserve3()))
                && (this.getReserve4() == null ? other.getReserve4() == null : this.getReserve4().equals(other.getReserve4()))
                && (this.getReserve5() == null ? other.getReserve5() == null : this.getReserve5().equals(other.getReserve5()))
                && (this.getDelFlg() == null ? other.getDelFlg() == null : this.getDelFlg().equals(other.getDelFlg()))
                && (this.getCreateUserid() == null ? other.getCreateUserid() == null : this.getCreateUserid().equals(other.getCreateUserid()))
                && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
                && (this.getUpdateUserid() == null ? other.getUpdateUserid() == null : this.getUpdateUserid().equals(other.getUpdateUserid()))
                && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getBusinessId() == null) ? 0 : getBusinessId().hashCode());
        result = prime * result + ((getAccountType() == null) ? 0 : getAccountType().hashCode());
        result = prime * result + ((getBankId() == null) ? 0 : getBankId().hashCode());
        result = prime * result + ((getBrankName() == null) ? 0 : getBrankName().hashCode());
        result = prime * result + ((getBankBranchId() == null) ? 0 : getBankBranchId().hashCode());
        result = prime * result + ((getBrankNameChildren() == null) ? 0 : getBrankNameChildren().hashCode());
        result = prime * result + ((getBankBranchCodeLh() == null) ? 0 : getBankBranchCodeLh().hashCode());
        result = prime * result + ((getAccountName() == null) ? 0 : getAccountName().hashCode());
        result = prime * result + ((getBrankId() == null) ? 0 : getBrankId().hashCode());
        result = prime * result + ((getAccountState() == null) ? 0 : getAccountState().hashCode());
        result = prime * result + ((getDefaultCard() == null) ? 0 : getDefaultCard().hashCode());
        result = prime * result + ((getBankAccountProvince() == null) ? 0 : getBankAccountProvince().hashCode());
        result = prime * result + ((getRemarks() == null) ? 0 : getRemarks().hashCode());
        result = prime * result + ((getReserve1() == null) ? 0 : getReserve1().hashCode());
        result = prime * result + ((getReserve2() == null) ? 0 : getReserve2().hashCode());
        result = prime * result + ((getReserve3() == null) ? 0 : getReserve3().hashCode());
        result = prime * result + ((getReserve4() == null) ? 0 : getReserve4().hashCode());
        result = prime * result + ((getReserve5() == null) ? 0 : getReserve5().hashCode());
        result = prime * result + ((getDelFlg() == null) ? 0 : getDelFlg().hashCode());
        result = prime * result + ((getCreateUserid() == null) ? 0 : getCreateUserid().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateUserid() == null) ? 0 : getUpdateUserid().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", businessId=").append(businessId);
        sb.append(", accountType=").append(accountType);
        sb.append(", bankId=").append(bankId);
        sb.append(", brankName=").append(brankName);
        sb.append(", bankBranchId=").append(bankBranchId);
        sb.append(", brankNameChildren=").append(brankNameChildren);
        sb.append(", bankBranchCodeLh=").append(bankBranchCodeLh);
        sb.append(", accountName=").append(accountName);
        sb.append(", brankId=").append(brankId);
        sb.append(", accountState=").append(accountState);
        sb.append(", defaultCard=").append(defaultCard);
        sb.append(", bankAccountProvince=").append(bankAccountProvince);
        sb.append(", remarks=").append(remarks);
        sb.append(", reserve1=").append(reserve1);
        sb.append(", reserve2=").append(reserve2);
        sb.append(", reserve3=").append(reserve3);
        sb.append(", reserve4=").append(reserve4);
        sb.append(", reserve5=").append(reserve5);
        sb.append(", delFlg=").append(delFlg);
        sb.append(", createUserid=").append(createUserid);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateUserid=").append(updateUserid);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}